package com.spring5.learning;

import com.spring5.learning.env.Environment;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author xin
 * @version 1.0
 */
public class Main {


    @Test
    public void profile() {
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext();
        //ac.getEnvironment().setActiveProfiles("default");
        ac.register(AppConfig.class);
        ac.refresh();
        Environment env = ac.getBean(Environment.class);
        env.show();
    }
}
